-- GENERATED SPELL FOR [Nightmare Wanderer] --


function spell0_5283(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(12097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5283', 20312, 1)
end

function spell1_5283(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5283', 643, 1)
end

function Sorts_5283(pUnit, Event)
local choix_sorts_5283 = math.random(0, 1)
if choix_sorts_5283 == 0 then
pUnit:RegisterEvent('spell0_5283', 1, 1)
end
if choix_sorts_5283 == 1 then
pUnit:RegisterEvent('spell1_5283', 1, 1)
end
end

function mob5283_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5283', math.random(1500, 3000), 1)
end

function mob5283_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5283_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5283_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5283, 1, 'mob5283_Action')
RegisterUnitEvent(5283, 2, 'mob5283_Leave')
RegisterUnitEvent(5283, 3, 'mob5283_Kill')
RegisterUnitEvent(5283, 4, 'mob5283_Die')
